/**
*  \file control_pump.h
*
*  \brief
*
*  \author Michael J. Hohmann  michael.hohmann@linde-mh.de
*/
#ifndef CONTROL_PUMP_H_INCLUDED
#define CONTROL_PUMP_H_INCLUDED

/*================================================[ public includes  ]================================================*/
#include "../cfg/prj.h"
#include "../trilean/trilean.h"
#include "../input/input.h"
#include "../parameter/service.h"
#include "../trilean/trilean.h"
/*================================================[ public defines   ]================================================*/

/*================================================[ public datatypes ]================================================*/

/*================================================[ public variables ]================================================*/

extern S16 pump_motor_enable;			//enable the converter
extern S16 pump_motor_PWM_enable;		//enable the PWM (if OK, the magnetReady will be 1);

/*================================================[ inline functions ]================================================*/

/*================================================[ public functions ]================================================*/
/**
*  Initialization.
*
*  Initialize the control_pump module.
*
*  \return RC_SUCCESS if successful.
*/
RC control_pump_initialize( void );


/** Control Pump
*
*  \return Pump speed in RPM
*/
S16 control_pump_10ms();

/*
*
*  Calculate the torque
*
* input: rpm
*/
S16 calculate_pump_torque_10ms();

/*====================================================================================================================*/

#endif

/***********************************************************************************************************************
*                             Copyright 2020 Linde Material Handling. All rights reserved.                             *
***********************************************************************************************************************/

